package com.iris.live.services.data.models;

import javax.persistence.*;
import java.sql.Date;
import java.sql.Timestamp;

/**
 * Created by 37966 on 2016/11/21.
 */
@SuppressWarnings("JpaDataSourceORMInspection")
@Entity
@Table(name = "crm_complaint", schema = "live", catalog = "")
public class CrmComplaintModel {
    private Integer id;
    private String permit;
    private String source;
    private Date date;
    private String logUser;
    private String logAccount;
    private Integer custId;
    private String target;
    private String content;
    private Date feedbackDate;
    private String feedbackUser;
    private String feedbackAccount;
    private String result;
    private String updateAccount;
    private Timestamp updateTime;

    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    @Basic
    @Column(name = "permit")
    public String getPermit() {
        return permit;
    }

    public void setPermit(String permit) {
        this.permit = permit;
    }

    @Basic
    @Column(name = "source")
    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    @Basic
    @Column(name = "date")
    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    @Basic
    @Column(name = "logUser")
    public String getLogUser() {
        return logUser;
    }

    public void setLogUser(String logUser) {
        this.logUser = logUser;
    }

    @Basic
    @Column(name = "logAccount")
    public String getLogAccount() {
        return logAccount;
    }

    public void setLogAccount(String logAccount) {
        this.logAccount = logAccount;
    }

    @Basic
    @Column(name = "custId")
    public Integer getCustId() {
        return custId;
    }

    public void setCustId(Integer custId) {
        this.custId = custId;
    }

    @Basic
    @Column(name = "target")
    public String getTarget() {
        return target;
    }

    public void setTarget(String target) {
        this.target = target;
    }

    @Basic
    @Column(name = "content")
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Basic
    @Column(name = "feedbackDate")
    public Date getFeedbackDate() {
        return feedbackDate;
    }

    public void setFeedbackDate(Date feedbackDate) {
        this.feedbackDate = feedbackDate;
    }

    @Basic
    @Column(name = "feedbackUser")
    public String getFeedbackUser() {
        return feedbackUser;
    }

    public void setFeedbackUser(String feedbackUser) {
        this.feedbackUser = feedbackUser;
    }

    @Basic
    @Column(name = "feedbackAccount")
    public String getFeedbackAccount() {
        return feedbackAccount;
    }

    public void setFeedbackAccount(String feedbackAccount) {
        this.feedbackAccount = feedbackAccount;
    }

    @Basic
    @Column(name = "result")
    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    @Basic
    @Column(name = "updateAccount")
    public String getUpdateAccount() {
        return updateAccount;
    }

    public void setUpdateAccount(String updateAccount) {
        this.updateAccount = updateAccount;
    }

    @Basic
    @Column(name = "updateTime")
    public Timestamp getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Timestamp updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CrmComplaintModel that = (CrmComplaintModel) o;

        if (id != that.id) return false;
        if (permit != null ? !permit.equals(that.permit) : that.permit != null) return false;
        if (source != null ? !source.equals(that.source) : that.source != null) return false;
        if (date != null ? !date.equals(that.date) : that.date != null) return false;
        if (logUser != null ? !logUser.equals(that.logUser) : that.logUser != null) return false;
        if (logAccount != null ? !logAccount.equals(that.logAccount) : that.logAccount != null) return false;
        if (custId != null ? !custId.equals(that.custId) : that.custId != null) return false;
        if (target != null ? !target.equals(that.target) : that.target != null) return false;
        if (content != null ? !content.equals(that.content) : that.content != null) return false;
        if (feedbackDate != null ? !feedbackDate.equals(that.feedbackDate) : that.feedbackDate != null) return false;
        if (feedbackUser != null ? !feedbackUser.equals(that.feedbackUser) : that.feedbackUser != null) return false;
        if (feedbackAccount != null ? !feedbackAccount.equals(that.feedbackAccount) : that.feedbackAccount != null)
            return false;
        if (result != null ? !result.equals(that.result) : that.result != null) return false;
        if (updateAccount != null ? !updateAccount.equals(that.updateAccount) : that.updateAccount != null)
            return false;
        if (updateTime != null ? !updateTime.equals(that.updateTime) : that.updateTime != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result1 = id;
        result1 = 31 * result1 + (permit != null ? permit.hashCode() : 0);
        result1 = 31 * result1 + (source != null ? source.hashCode() : 0);
        result1 = 31 * result1 + (date != null ? date.hashCode() : 0);
        result1 = 31 * result1 + (logUser != null ? logUser.hashCode() : 0);
        result1 = 31 * result1 + (logAccount != null ? logAccount.hashCode() : 0);
        result1 = 31 * result1 + (custId != null ? custId.hashCode() : 0);
        result1 = 31 * result1 + (target != null ? target.hashCode() : 0);
        result1 = 31 * result1 + (content != null ? content.hashCode() : 0);
        result1 = 31 * result1 + (feedbackDate != null ? feedbackDate.hashCode() : 0);
        result1 = 31 * result1 + (feedbackUser != null ? feedbackUser.hashCode() : 0);
        result1 = 31 * result1 + (feedbackAccount != null ? feedbackAccount.hashCode() : 0);
        result1 = 31 * result1 + (result != null ? result.hashCode() : 0);
        result1 = 31 * result1 + (updateAccount != null ? updateAccount.hashCode() : 0);
        result1 = 31 * result1 + (updateTime != null ? updateTime.hashCode() : 0);
        return result1;
    }
}
